﻿/*
 * Created by SharpDevelop.
 * User: Corrado Mio
 * Date: 01/06/2012
 * Time: 09:49
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;
using System.Reflection;
using System.Text;

namespace CSharpExt.Reflection
{
    /// <summary>
    /// Description of ReflectionUtils.
    /// </summary>
    public static class ReflectionUtils
    {
        #region Extension Methods
       
        public static String Parameters(this MethodInfo method)
        {
            StringBuilder sb = new StringBuilder("(");
            ParameterInfo[] parameters = method.GetParameters();
            for(int i=0; i<parameters.Length; ++i)
            {
                if(i > 0) sb.Append(", ");
                sb.Append(parameters[i].ParameterType);
            }
            return sb.Append(")").ToString();
        }
        
        #endregion
    }
}
